Many computer programs may contain one or more enumerations. The enumerations may define a finite set of named constants that are bound to unique values. The finite set of named constants may be called an enumeration list. The set of named constants may be said to define the enumeration.
In some computer programs, the named constants may be bound to values that are represented by an integral data type. The integral data type may be referred to as an underlying type of the enumeration. For example, in some computer programs, an integer is used to represent values bound to named constants. Here the underlying type of the enumeration is an integer.
The values associated with the named constants may start at a predefined value (which in some cases may be specified) and increment by some value (e.g., one) for each named constant in the enumeration list. Thus, for example, if the starting value is zero and the increment is one, the first named constant in an enumeration list would be associated with zero, the second named constant would be associated with one, the third named constant would be associated with two and so on.